<?php
require_once './header.php';
require_once './core/sql.php';
$sql = new SqlS();
?>
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=0,maximum-scale=1.0"/>
        <title>上传二维码</title>
        <link rel="stylesheet" href="./css/base.css">
        <link rel="stylesheet" href="./css/cropper.css">
        <link rel="stylesheet" href="./css/index.css">
        <script>
            function adapte() {//适配
                var designWidth = 1080, rem2px = 100;
                document.documentElement.style.fontSize = window.innerWidth / designWidth * rem2px + "px";
            }
            adapte();
        </script>
        <style>
        </style>
    </head>
    <body>
    <div class="code">
        <div class="box1">
            <div class="box1-content">
                <img id="image" src="<?= $_SESSION['image-code'] ?>">
            </div>
            <ul class="bottom flex">
                <li><a href="javascript:history.go(-1);">取消</a></li>
                <li><a href="javascript:location.reload();">还原</a></li>
                <li><a href="javascript:;" onclick="ajax_cutComplete()">完成</a></li>
            </ul>
        </div>
    </div>
    <script src='./script/jquery.js'></script>
    <script src='./script/index.js'></script>
    <script src="./script/cropper.js"></script>
    <script>
        $('#image').cropper({
            aspectRatio: 9 / 9,
            viewMode: 1,
            dragMode: 'none',
            preview: ".small",
            responsive: false,
            restore: false,
            crop: function (e) {
                console.log(e);
            }
        });

    </script>
    </body>
    </html>
<?php
require_once './footer.php';